using LogionDemo.Models;
using LogionDemo.Views;

namespace LogionDemo
{
	internal static class Program
	{
		private static void Application_ThreadException(object sender, ThreadExceptionEventArgs e)
		{
			MessageBox.Show(e.Exception.Message);
		}

		[STAThread]
		static void Main()
		{
			RegisterInfoContext.InitializeDatabase();
			ApplicationConfiguration.Initialize();
			Application.ThreadException += Application_ThreadException;
			LoginForm login = new LoginForm();
			if (login.ShowDialog() == DialogResult.OK)
			{
				Application.Run(new MainForm());
			}
		}
	}
}